package base.template;

class CountedObject{
	private static long count=0;
	private final long id=count++;
	public long getId(){
		return id;
	}
	public String toString() {
		return "countedObject "+id;
	}
}

public class BasicGeneratorDemo {
	public static void main(String[] args) {
		Generator<CountedObject> generator=BasicGenerator.create(CountedObject.class);
		
		for(int i=0;i<5;i++){
			System.out.println(generator.next());
		}
	}
}
